Learn R Programming

SpatialExtremes (version 2.0-7)

Generalized Extreme Value Distribution: The Generalized Extreme Value Distribution

Description

Density, distribution function, quantile function and random generation for the GP distribution with location equal to 'loc', scale equal to 'scale' and shape equal to 'shape'.

Usage

rgev(n, loc = 0, scale = 1, shape = 0)
pgev(q, loc = 0, scale = 1, shape = 0, lower.tail = TRUE)
qgev(p, loc = 0, scale = 1, shape = 0, lower.tail = TRUE)
dgev(x, loc = 0, scale = 1, shape = 0, log = FALSE)

Arguments

x, q

vector of quantiles.

p

vector of probabilities.

n

number of observations.

loc

vector of the location parameters.

scale

vector of the scale parameters.

shape

a numeric of the shape parameter.

lower.tail

logical; if TRUE (default), probabilities are \(\Pr[ X \le x]\), otherwise, \(\Pr[X > x]\).

log

logical; if TRUE, probabilities p are given as log(p).

Value

If 'loc', 'scale' and 'shape' are not specified they assume the default values of '0', '1' and '0', respectively.

The GEV distribution function for loc = \(u\), scale = \(\sigma\) and shape = \(\xi\) is

$$G(x) = \exp\left[-\left\{1 + \xi \frac{x - u}{\sigma} \right\}^{-1 / \xi} \right]$$ for \(1 + \xi ( x - u ) / \sigma > 0\) and \(x > u\), where \(\sigma > 0\). If \(\xi = 0\), the distribution is defined by continuity corresponding to the Gumbel distribution.

Examples

Run this code
# NOT RUN {
dgev(0.1)
rgev(100, 1, 2, 0.2)
qgev(seq(0.1, 0.9, 0.1), 1, 0.5, -0.2)
pgev(12.6, 2, 0.5, 0.1)
# }

Run the code above in your browser using DataLab